﻿@model DAL.Category

@{
    ViewBag.Title = "Details de la catégorie : " + @Model.Name;
}

<div class="container">
    <h2>@ViewBag.Message</h2>
    <h3>@Model.Name : </h3><hr /><br />

    <p>
        <strong>Description : </strong><br />
        <div class="well">@Model.Description</div>
    </p><br />

    <p>
        <strong>Liste des articles liés à la catégorie :</strong>
    </p>
    <ul>
        @foreach (DAL.Article article in Model.Article)
        {
            <li>@Html.ActionLink(article.Title, "../Articles/Details/" + article.ID)</li>
        }
    </ul><br />

    @if (Request.IsAuthenticated)
    {
        <p>
            <a href="/Categories/Edit/@Model.ID" class="btn btn-primary btn-medium"><i class="icon-pencil icon-white"></i> Editer</a>
            <a href="/Categories/Delete/@Model.ID" class="btn btn-danger btn-medium"><i class="icon-trash icon-white"></i> Supprimer</a>
        </p><br />
    }

    <a href="../" class="btn btn-warning btn-medium"><i class="icon-chevron-left icon-white"></i> Revenir à la liste</a>
</div>